# QtGui.QPixmap is one of the widgets that is used to work with images.
# In this example we will show an image on a window (well widget actually)

import sys
from PySide import QtGui, QtCore

class Window(QtGui.QWidget):
    def __init__(self):
        super(Window, self).__init__()

        hbox = QtGui.QHBoxLayout(self)
        pixmap = QtGui.QPixmap("open.jpg")
        pixmap = pixmap.scaled(100, 100)

        # Create a label object and set its pixmap property to our selected pixmap
        lbl = QtGui.QLabel(self)
        lbl.setPixmap(pixmap)

        hbox.addWidget(lbl)
        self.setLayout(hbox)

        self.setGeometry(200, 200, 400, 400)
        self.setWindowTitle("Pixmap")

if __name__ == "__main__":
    appObject = QtGui.QApplication(sys.argv)
    ex = Window()
    ex.show()
    sys.exit(appObject.exec_())